﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RPGLibrary;

namespace RpgEditor
{
    public partial class FormNewGame : Form
    {
        public RolePlayingGame RPG { get; private set; }

        public FormNewGame()
        {
            InitializeComponent();
            btnOK.Click += new EventHandler(btnOK_Click);
        }

        void btnOK_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbName.Text) || string.IsNullOrEmpty(tbDescription.Text))
            {
                MessageBox.Show("You Must Enter A Valid Name & Description.");
                return;
            }

            RPG = new RolePlayingGame(tbName.Text, tbDescription.Text);

            Close();
        }
    }
}
